import 'package:flutter/material.dart';
import 'package:flutter/src/scheduler/ticker.dart';


class AnimationPageView extends StatefulWidget {
  @override
  State<StatefulWidget> createState() {
    return  AnimateState();
  }
   

}

class AnimateState extends State<AnimationPageView> with SingleTickerProviderStateMixin {

AnimationController controller;
Animation<double> animation;

  @override
  void initState() {
        super.initState();

    controller = AnimationController(vsync: this, duration: Duration(milliseconds:1000));
    animation = Tween(begin:50.0, end:200.0).animate(controller)..addListener(() {
      setState((){});
    });
    controller.forward();
  }
  @override
  Widget build(BuildContext context) {
    return  Center( child: Container( width: animation.value, // 将动画的值赋给widget的宽高 
    height: animation.value, 
    child: FlutterLogo() ));
  }

  
  @override 
  void dispose() {
    controller.dispose();
     super.dispose();
  }
}